<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>车辆借调管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/exchg/tBusExchg/">可借出车辆一览</a></li>
		<li><a href="${ctx}/exchg/tBusExchg/outlist">已借出车辆一览</a></li>
		<li class="active"><a href="${ctx}/exchg/tBusExchg/inlist">已借入车辆一览</a></li>
		<%-- <shiro:hasPermission name="exchg:tBusExchg:edit"><li><a href="${ctx}/exchg/tBusExchg/form">车辆调拨添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="tBusExchg" action="${ctx}/exchg/tBusExchg/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
			<ul class="ul-form">		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>借出公司</th>
				<th>借出起期</th>
				<th>归还日期</th>
				<th>车牌型号</th>
				<th>车牌号</th>
				<th>座位数</th>
				<th>车辆等级</th>
				<th>车辆状态</th>
				<th>操作</th>		
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tBusExchg">
			<tr>
				<td>${tBusExchg.sourcecompany.name}</td>
				<td><fmt:formatDate value="${tBusExchg.startdate}" pattern="yyyy-MM-dd"/></td>
				<td><fmt:formatDate value="${tBusExchg.enddate}" pattern="yyyy-MM-dd"/></td>
				<td>${tBusExchg.compbus.vehiclename}</td>
				<td>${tBusExchg.compbus.licenseno}</td>
				<td>${tBusExchg.compbus.seats}</td>
				<td>${fns:getDictLabel(tBusExchg.compbus.busclass, 'dbo_vehicle', '无')}</td>
				<td>${fns:getDictLabel(tBusExchg.compbus.busstatus, 'Y_N', '无')}</td>
				<shiro:hasPermission name="exchg:tBusExchg:edit"><td>
    				<a href="${ctx}/exchg/tBusExchg/delete?busid=${tBus.busid}">归还</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>